<?php
if(!defined('IN_PHPSCUP'))exit('hacking'); 

class JobApp extends BaseApp
{
    function index()
    {
		$GLOBALS['Lang']->_get_lang('job');	
		$TB_nav = &$this->_model('nav');	 
		
		$navdata = $TB_nav->show(COMPANY_ID);
		foreach($navdata as $key => $value)
		{
		 unset($navdata[$key]['config']);				
         $navdata[$key]['config'] = @unserialize($value['config']);		
		}			
		
        $this->assign('navigation', $navdata);
		$companydata = $TB_nav->companymsg(COMPANY_ID);			
        $this->assign('companydata', $companydata);			
		$TB_job = &$this->_model('job'); 
				
		$data = $TB_job->show(COMPANY_ID);	
	    

        $this->assign('lw_data', $data['data']);		
		$this->assign('lw_page', $data['page']); 	
        $this->assign('companyid',COMPANY_ID);	    
        $this->assign('view_charset', VIEW_CHARSET);	
        $this->assign('page_title', SITE_TITLE);
        $this->assign('page_description', SITE_DESCRIPTION);
        $this->assign('page_keywords', SITE_KEYWORDS);		
        $this->assign('langtype', trim($GLOBALS['Lang']->_lang_tp));
        $this->assign('site_url',SITE_URL);
		$this->assign('bg_pic_url',SITE_URL.'/'.$GLOBALS['SCup']->SCup_name.'/view/'.VIEW_TYPE .'/style/'.CSS_TYPE.'/');	
			
        $this->assign('login_icon', $GLOBALS['SCup']->SCup_user_checking);		
		
        $this->display('job.view.html');
    }
	
    function show()
    {
		
		$id= intval($_GET['id']);
		$GLOBALS['Lang']->_get_lang('job');	
		$TB_nav = &$this->_model('nav');	 
		
		$navdata = $TB_nav->show(COMPANY_ID);
		foreach($navdata as $key => $value)
		{
		 unset($navdata[$key]['config']);				
         $navdata[$key]['config'] = @unserialize($value['config']);		
		}			
		
        $this->assign('navigation', $navdata);
		$companydata = $TB_nav->companymsg(COMPANY_ID);			
        $this->assign('companydata', $companydata);			
		$TB_job = &$this->_model('job'); 
				
		$data = $TB_job->oneshow($id,COMPANY_ID);	

			
$PHP_SELF_TEMP=$_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
$_SERVER['QUERY_STRING'] && $PHP_SELF_TEMP .= "?".$_SERVER['QUERY_STRING'];
$PHP_SELF=$_SERVER['REQUEST_URI']?$_SERVER['REQUEST_URI']:$PHP_SELF_TEMP;
$HTTP_HOST=$_SERVER['HTTP_HOST']?$_SERVER['HTTP_HOST']:$HTTP_SERVER_VARS['HTTP_HOST'];
$WEBURL='http://'.$HTTP_HOST.$PHP_SELF;

        $this->assign('request_url', $WEBURL);
		
        $this->assign('data', $data);	
        $this->assign('companyid',COMPANY_ID);		    
        $this->assign('view_charset', VIEW_CHARSET);	
        $this->assign('page_title', SITE_TITLE);
        $this->assign('page_description', SITE_DESCRIPTION);
        $this->assign('page_keywords', SITE_KEYWORDS);	
        $this->assign('langtype', trim($GLOBALS['Lang']->_lang_tp));
	        $this->assign('site_url',SITE_URL);	
		$this->assign('bg_pic_url',SITE_URL.'/'.$GLOBALS['SCup']->SCup_name.'/view/'.VIEW_TYPE .'/style/'.CSS_TYPE.'/');	

        $this->assign('login_icon', $GLOBALS['SCup']->SCup_user_checking);		
		
        $this->display('jobshow.view.html');
    }


   
}





?>